<?php
/**
* 接口所支持的店铺
*/
class inventorydepth_shop_api_support
{
    
    function __construct($app)
    {
        $this->app = $app;
    }

    public static $item_sku_get_shops = array('taobao','paipai','360buy', 'ecos.b2c','bbc','ecos.b2b2c.stdsrc');
    /**
     * 接口store.item.sku.get
     *
     * @param String $shop_type 店铺类型
     * @return void
     * @author 
     **/
    public static function item_sku_get_support($shop_type)
    {
        return in_array($shop_type,self::$item_sku_get_shops);
    }

    public static $items_all_get_shops = array('taobao','paipai','360buy', 'ecos.b2c','bbc','ecos.b2b2c.stdsrc');
    public static $stock_shop_type_not_support = array('alibaba','suning','amazon', 'kaola', 'pinduoduo','juanpi','cmb','haoshiqi','vop','eyee','yunji');//不显示前端购物小车的店铺类型
    
    //不支持库存回写的店铺类型
    public static $no_write_back_stock = array('pinduoduo', 'haoshiqi', 'yunji');
    
    /**
     * 接口store.item.all.get
     *
     * @return void
     * @author 
     **/
    public static function items_all_get_support($shop_type,$business_type='zx')
    {
        return in_array($shop_type,self::$items_all_get_shops);
    }

    public static function stock_get_not_support($shop_type)
    {
        return !in_array($shop_type, self::$stock_shop_type_not_support);
    }

    public static $items_get_shops = array('taobao','paipai','360buy', 'ecos.b2c','bbc','ecos.b2b2c.stdsrc');
    /**
     * 接口store.item.get 
     *
     * @return void
     * @author 
     **/
    public static function items_get_support($shop_type)
    {
        return in_array($shop_type,self::$items_get_shops);
    }
    
    /**
     * 禁止上下架店铺类型
     *
     * @param String $shop_type 店铺类型
     * @return void
     * @author wangbiao@shopex.cn
     **/
    public static $prohibit_onsale_shops = array('ecos.b2c');
    public static function prohibit_onsale_shops($shop_type)
    {
        return in_array($shop_type, self::$prohibit_onsale_shops);
    }
}